package ysq.xyg.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysq.xyg.dao.ComplainDao;
import ysq.xyg.model.Complain;
import ysq.xyg.service.ComplainService;

import javax.annotation.Resource;
import java.util.List;

/**
 * 会员申诉
 *
 * @author congcong tao
 * @date 2018/9/5 12:03
 */
@Service("complainService")
public class ComplainServiceImpl extends BaseServiceImpl<Complain> implements ComplainService {

    @Resource
    private ComplainDao complainDao;
    @Autowired
    public void setComplainDao(ComplainDao complainDao) {
        this.baseDao = complainDao;
    }

    @Override
    public PageInfo<Complain> pageInfo(Complain complain, int pageSize, int pageNum) {
        PageHelper.startPage(pageNum, pageSize);
        List<Complain> list = complainDao.selectEntity(complain);
        return new PageInfo<Complain>(list);
    }

    @Override
    public List<Complain> selectEntity(Complain complain) {
        return complainDao.selectEntity(complain);
    }
}
